<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>抱抱堂-摇摇乐</title>
        <meta name="renderer" content="webkit">
        <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="{:C('IMG_PATH')}static/css/main.css?v=11">
    </head>
    <body class="mycard-bg">
	    <header class="index">
	        <section><a href="{:U('Portal/index/xiangxi', array('source' => U('Portal/index/honghongbao')))}"><img src="{$user_info.avatar}" /></a></section>
	        <section>
	            <h4 style="color:#000000;">{$user_info.nickname}</h4>
	        </section>
	        <section style="text-align:right;padding-right:16px;">
	          	<button class="yellow-btn" id="qiandao">&nbsp;&nbsp;&nbsp;签到&nbsp;&nbsp;&nbsp;</button>
	        </section>
	    </header>
      <section class="list-hongbao">
		<div><img src="{:C('IMG_PATH')}/static/img/icon_hongbao.png" /></div>
		<div class="red" >
		<p class="red"><span>{$money}</span> 元</p>
		</div>
		<div style="width: 150px">
		<!--<button class="red-btn" id="duobao">参与夺宝</button>-->
		<!--<button class="yellow-btn tixian-btn">立即提现</button>-->
		</div>
      </section>
  	<if condition="$real['adimg']" >
      <section class="list-adv">
			<a href="{$real.adurl}">
				<img src="{:C('IMG_PATH')}{$real.adimg}" />
			</a>
      </section>
    </if>
      <h5 class="list-title">我的卡券</h5>
      <section class="list">
          <ul>
              <foreach name="userCards" item="vo" key="key" >
               <li class="brief" data-url="{:U('Portal/Index/cardDetail',array('cardId'=>$vo['id'],'cardCode'=>$vo['card_num']))}">
                  <div>
                      <h5>{$vo.card_name}</h5>
                      <p>{$vo.winning_time}</p>
                  </div>
                  <section>
                      <div><img src="{:C('IMG_PATH')}{$vo.card_icon}"></div>
                      <div>
                          <p><span>{$vo.card_intro}</span><span></span></p>
                      </div>
                  </section>
              </li>
              </foreach>
          </ul><br><br><br>
      </section>
      <footer class="white"><img src="{:C('IMG_PATH')}/static/img/logo_gray.png" /></footer>
    </body>
    <script src="{:C('IMG_PATH')}/static/zepto.min.js"></script>
    <script>
    (function(){
        $(".button-none").on("click", function(){
            window.location.href = "{:U('Portal/index/index')}";
        });

        $("li.brief").on("click", function(e){
            var li = e.target;
            while(li.nodeName.toLowerCase() != "li"){
                li = li.parentNode;
            }
            window.location.href = $(li).data("url");
        });

        $(".tixian-btn").on("click", function(){
            // 提现
            window.location.href = "{:U('Portal/index/getdeposit')}";
        });
        $("#qiandao").on("click", function(){
			$.get("{:U('Portal/index/qiandao')}",function(data){
			    alert(data);
		    });
        });
        $("#duobao").on("click", function(){
            // 提现
            window.location.href = "{:U('Portal/index/duobao', array('sr'=> 'tixian'))}";
        });
        $("#xunzhang").on("click", function(){
            // 提现
            window.location.href = "{:U('Portal/index/xunzhang')}";
        });
    })();
    </script>
</html>
